﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UsrMenuLeft.ascx.cs"
    Inherits="Fashion.BackEnd.Common.UsrMenuLeft" %>
<script type="text/javascript">
    $(document).ready(function () {
        $('.item-menu-left').click(function () {
<%--            var display = $(this).parent().find('.menu-child-left').css('display');--%>
<%--            $('.menu-child-left').css("display", "none");--%>
<%--            if (display == 'none') {--%>
<%--                $(this).parent().find(".menu-child-left").css("display", "");--%>
<%--            }--%>
            $(this).parent().find('.menu-child-left').toggle();
        });
    });
</script>
<asp:DataList ID="dlMenu" runat="server" RepeatColumns="1" Width="100%" 
    CssClass='menu-left' OnItemDataBound="dlMenu_ItemDataBound">
    <ItemStyle CssClass="item-menu" />
    <ItemTemplate>
        <div class="item-menu-left">
            <p><%#Eval("Name") %></p></div>
        <div class="menu-child-left" style='<%#GetDisplay(Eval("Id"))%>'>
            <asp:DataList ID="dlMenuChild" runat="server" RepeatColumns="1" Width="100%">
                <ItemTemplate>
                    <div class='menu-child-name'><p><%#Eval("Name") %></p></div>
                    <ul>
                        <%#GetPage(Eval("Id")) %>
                    </ul>
                </ItemTemplate>
            </asp:DataList>
        </div>
    </ItemTemplate>
</asp:DataList>